
<!DOCTYPE HTML>
<html lang="Chinese" >
    <head>
        <title>队列集合 · freeRTOS中文文档</title>
        <meta charset="UTF-8">
        <meta http-equiv="X-UA-Compatible" content="IE=edge" />
        <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
        <meta name="description" content="">
        <meta name="generator" content="GitBook 3.2.0">
        <meta name="author" content="tangguocheng">
        
        
    
    <link rel="stylesheet" href="../../gitbook/style.css">

    
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-prismx/prism.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-fontsettings/website.css">
                
            
                
                <link rel="stylesheet" href="../../gitbook/gitbook-plugin-theme-comscore/test.css">
                
            
        

    

    
        
    
        
    
        
    
        
    
        
    

        
    
    
    <meta name="HandheldFriendly" content="true"/>
    <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
    <meta name="apple-mobile-web-app-capable" content="yes">
    <meta name="apple-mobile-web-app-status-bar-style" content="black">
    <link rel="apple-touch-icon-precomposed" sizes="152x152" href="../../gitbook/images/apple-touch-icon-precomposed-152.png">
    <link rel="shortcut icon" href="../../gitbook/images/favicon.ico" type="image/x-icon">

    
    <link rel="next" href="中断延迟.html" />
    
    
    <link rel="prev" href="运行时间统计.html" />
    

    </head>
    <body>
        
<div class="book">
    <div class="book-summary">
        
            
            
                <nav role="navigation">
                


<ul class="summary">
    
    
    
        
        <li>
            <a href="http://www.xn--4gqa63c686ta68iba.ren/" target="_blank" class="custom-link">博客</a>
        </li>
    
    

    
    <li class="divider"></li>
    

    
        
        
    
        <li class="chapter " data-level="1.1" data-path="../../">
            
                <a href="../../">
            
                    
                    关于
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2" data-path="../../简介/freeRTOS介绍.html">
            
                <a href="../../简介/freeRTOS介绍.html">
            
                    
                    简介
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.2.1" data-path="../../简介/编码规则和风格.html">
            
                <a href="../../简介/编码规则和风格.html">
            
                    
                    编码规则和风格
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.2" data-path="../../简介/许可.html">
            
                <a href="../../简介/许可.html">
            
                    
                    许可
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.2.3" data-path="../../简介/快速开始指南.html">
            
                <a href="../../简介/快速开始指南.html">
            
                    
                    快速开始指南
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3" data-path="../../入门/readme.html">
            
                <a href="../../入门/readme.html">
            
                    
                    入门
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1" data-path="../../入门/任务和协程/readme.html">
            
                <a href="../../入门/任务和协程/readme.html">
            
                    
                    任务和协程
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.1.1" data-path="../../入门/任务和协程/任务.html">
            
                <a href="../../入门/任务和协程/任务.html">
            
                    
                    任务
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.1.2" data-path="../../入门/任务和协程/协程.html">
            
                <a href="../../入门/任务和协程/协程.html">
            
                    
                    协程
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.2" data-path="../../入门/通信机制/readme.html">
            
                <a href="../../入门/通信机制/readme.html">
            
                    
                    通信机制
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.3.2.1" data-path="../../入门/通信机制/队列.html">
            
                <a href="../../入门/通信机制/队列.html">
            
                    
                    队列
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.2" data-path="../../入门/通信机制/二值信号量.html">
            
                <a href="../../入门/通信机制/二值信号量.html">
            
                    
                    二值信号量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.3" data-path="../../入门/通信机制/计数信号量.html">
            
                <a href="../../入门/通信机制/计数信号量.html">
            
                    
                    计数信号量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.4" data-path="../../入门/通信机制/互斥量.html">
            
                <a href="../../入门/通信机制/互斥量.html">
            
                    
                    互斥量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.5" data-path="../../入门/通信机制/递归互斥量.html">
            
                <a href="../../入门/通信机制/递归互斥量.html">
            
                    
                    递归互斥量
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.2.6" data-path="../../入门/通信机制/任务通知.html">
            
                <a href="../../入门/通信机制/任务通知.html">
            
                    
                    任务通知
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.3.3" data-path="../../入门/事件组/事件组.html">
            
                <a href="../../入门/事件组/事件组.html">
            
                    
                    事件组
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.3.4" data-path="../../入门/软件定时器/软件定时器.html">
            
                <a href="../../入门/软件定时器/软件定时器.html">
            
                    
                    软件定时器
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    
        <li class="chapter " data-level="1.4" data-path="../readme.md">
            
                <span>
            
                    
                    进阶
            
                </a>
            

            
            <ul class="articles">
                
    
        <li class="chapter " data-level="1.4.1" data-path="../源代码组织结构/源代码组织结构.html">
            
                <a href="../源代码组织结构/源代码组织结构.html">
            
                    
                    源代码组织结构
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.2" data-path="配置文件.html">
            
                <a href="配置文件.html">
            
                    
                    配置文件
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.3" data-path="跟踪特性.html">
            
                <a href="跟踪特性.html">
            
                    
                    跟踪特性
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.4" data-path="低功耗支持.html">
            
                <a href="低功耗支持.html">
            
                    
                    低功耗支持
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.5" data-path="运行时间统计.html">
            
                <a href="运行时间统计.html">
            
                    
                    运行时间统计
            
                </a>
            

            
        </li>
    
        <li class="chapter active" data-level="1.4.6" data-path="队列集合.html">
            
                <a href="队列集合.html">
            
                    
                    队列集合
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.7" data-path="中断延迟.html">
            
                <a href="中断延迟.html">
            
                    
                    中断延迟
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.8" data-path="静态分配与动态分配.html">
            
                <a href="静态分配与动态分配.html">
            
                    
                    静态和动态内存分配
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.9" data-path="内存管理.html">
            
                <a href="内存管理.html">
            
                    
                    内存管理
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.10" data-path="栈溢出检测.html">
            
                <a href="栈溢出检测.html">
            
                    
                    栈溢出检测
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.11" data-path="钩子函数.html">
            
                <a href="钩子函数.html">
            
                    
                    钩子函数
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.12" data-path="线程本地存储.html">
            
                <a href="线程本地存储.html">
            
                    
                    线程本地存储
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.13" data-path="移植指南.html">
            
                <a href="移植指南.html">
            
                    
                    移植指南
            
                </a>
            

            
        </li>
    
        <li class="chapter " data-level="1.4.14" data-path=".">
            
                <span>
            
                    
                    在windows上模拟
            
                </a>
            

            
        </li>
    

            </ul>
            
        </li>
    

    

    <li class="divider"></li>

    <li>
        <a href="https://www.gitbook.com" target="blank" class="gitbook-link">
            Published with GitBook
        </a>
    </li>
</ul>


                </nav>
            
        
    </div>

    <div class="book-body">
        
            <div class="body-inner">
                
                    

<div class="book-header" role="navigation">
    

    <!-- Title -->
    <h1>
        <i class="fa fa-circle-o-notch fa-spin"></i>
        <a href="../.." >队列集合</a>
    </h1>
</div>




                    <div class="page-wrapper" tabindex="-1" role="main">
                        <div class="page-inner">
                            
                                <section class="normal markdown-section">
                                
                                <h2 id="&#x961F;&#x5217;&#x96C6;&#x5408;">&#x961F;&#x5217;&#x96C6;&#x5408;</h2><p>freeRTOS&#x901A;&#x8FC7;&#x961F;&#x5217;&#x96C6;&#x5408;(Queue Sets)&#x5141;&#x8BB8;&#x4EFB;&#x52A1;&#x540C;&#x65F6;&#x963B;&#x585E;&#x5728;&#x591A;&#x4E2A;&#x961F;&#x5217;&#x6216;&#x8005;&#x4FE1;&#x53F7;&#x91CF;&#x4E0A;&#x3002;&#x961F;&#x5217;&#x548C;&#x4FE1;&#x53F7;&#x91CF;&#x4EE5;&#x96C6;&#x5408;&#x7684;&#x5F62;&#x5F0F;&#x7EC4;&#x7EC7;&#x3002;</p><p>&#x6CE8;&#x610F;&#xFF1A;&#x5C3D;&#x7BA1;&#x5728;&#x96C6;&#x6210;&#x7B2C;&#x4E09;&#x65B9;&#x7684;&#x670D;&#x52A1;&#x65F6;&#xFF0C;&#x6709;&#x65F6;&#x963B;&#x585E;&#x5728;&#x591A;&#x4E2A;&#x961F;&#x5217;&#x4E0A;&#x662F;&#x5FC5;&#x8981;&#x7684;&#xFF0C;&#x4F46;&#x662F;&#x8FD8;&#x6709;&#x5F88;&#x591A;&#x5176;&#x4ED6;&#x7684;&#x8BBE;&#x8BA1;&#x6A21;&#x5F0F;&#x53EF;&#x4EE5;&#x9AD8;&#x6548;&#x5B8C;&#x6210;&#x76F8;&#x540C;&#x7684;&#x529F;&#x80FD;&#xFF0C;&#x8BE6;&#x7EC6;&#x89C1;&#x6587;&#x7AE0;&#x5E95;&#x90E8;&#x90E8;&#x5206;&#x5185;&#x5BB9;&#x3002;</p><h2 id="&#x4F7F;&#x7528;&#x961F;&#x5217;&#x96C6;&#x5408;">&#x4F7F;&#x7528;&#x961F;&#x5217;&#x96C6;&#x5408;</h2><p>&#x961F;&#x5217;&#x96C6;&#x5408;&#x5728;&#x4F7F;&#x7528;&#x65B9;&#x6CD5;&#x4E0A;&#x548C;<code>select<span class="token punctuation">(</span><span class="token punctuation">)</span></code>&#x8FD9;&#x7C7B;API&#x51FD;&#x6570;&#x5F88;&#x50CF;&#xFF0C;&#x5B83;&#x4EEC;&#x90FD;&#x662F;&#x6807;&#x51C6;&#x7684;Berkeley sockets networking API&#x7684;&#x4E00;&#x90E8;&#x5206;&#x3002;</p><p>&#x961F;&#x5217;&#x96C6;&#x5408;&#x53EF;&#x4EE5;&#x5305;&#x542B;&#x961F;&#x5217;&#x548C;&#x4FE1;&#x53F7;&#x91CF;&#xFF0C;&#x5B83;&#x4EEC;&#x90FD;&#x662F;&#x961F;&#x5217;&#x96C6;&#x5408;&#x7684;&#x6210;&#x5458;&#x3002;API&#x51FD;&#x6570;&#x7684;&#x53C2;&#x6570;&#x53CA;&#x8FD4;&#x56DE;&#x503C;&#x53EF;&#x4EE5;&#x662F;&#x961F;&#x5217;&#x6216;&#x8005;&#x4FE1;&#x53F7;&#x91CF;&#x53E5;&#x67C4;&#x4E4B;&#x4E00;&#xFF0C;&#x4F7F;&#x7528;<code>QueueSetMemberHandle_t</code>&#x81EA;&#x5B9A;&#x4E49;&#x7C7B;&#x578B;&#x3002;&#x5BF9;&#x4E8E;<code>QueueHandle_t</code>&#x548C;<code>SemaphoreHandle_t</code>&#x7C7B;&#x578B;&#x7684;&#x53D8;&#x91CF;&#x53EF;&#x4EE5;&#x9690;&#x5F0F;&#x7684;&#x8F6C;&#x6362;&#x4E3A;<code>QueueSetMemberHandle_t</code>&#x800C;&#x4E0D;&#x4F1A;&#x5BFC;&#x81F4;&#x4EFB;&#x4F55;&#x7F16;&#x8BD1;&#x5668;&#x8B66;&#x544A;&#xFF0C;&#x56E0;&#x6B64;&#x8FD9;&#x79CD;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x7684;&#x8F6C;&#x6362;&#x53EF;&#x4EE5;&#x4E0D;&#x7528;&#x663E;&#x793A;&#x7684;&#x5F3A;&#x5236;&#x8F6C;&#x6362;&#xFF0C;<em>&#x6211;&#x7684;&#x60F3;&#x6CD5;&#xFF1A;&#x51E1;&#x662F;&#x6D89;&#x53CA;&#x5230;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x7684;&#x8F6C;&#x6362;&#xFF0C;&#x6700;&#x597D;&#x663E;&#x793A;&#x8F6C;&#x6362;&#xFF0C;&#x4E00;&#x65B9;&#x9762;&#x4E0D;&#x4F1A;&#x51FA;&#x9519;&#xFF0C;&#x53E6;&#x4E00;&#x65B9;&#x9762;&#x4E5F;&#x53EF;&#x4EE5;&#x8BA9;&#x9605;&#x8BFB;&#x4F60;&#x7684;&#x4EE3;&#x7801;&#x7684;&#x4EBA;&#x77E5;&#x9053;&#x8FD9;&#x662F;&#x4F60;&#x6545;&#x610F;&#x4E3A;&#x4E4B;&#xFF0C;&#x800C;&#x4E0D;&#x4F1A;&#x5305;&#x542B;&#x5176;&#x4ED6;&#x6B67;&#x4E49;&#x3002;</em>&#x3002;</p><table border="1" cellspacing="1" cellpadding="4">
    <tr>
        <td valign="top" width="200">
            <b>
                &#x521B;&#x5EFA;&#x961F;&#x5217;&#x96C6;&#x5408;
            </b>
        </td>
        <td>
            &#x5728;&#x4F7F;&#x7528;&#x961F;&#x5217;&#x96C6;&#x5408;&#x4E4B;&#x524D;&#x5FC5;&#x987B;&#x4F7F;&#x7528;
            <a href="xQueueCreateSet.html">xQueueCreateSet()</a> API&#x51FD;&#x6570;&#x521B;&#x5EFA;&#x96C6;&#x5408;&#x961F;&#x5217;.&#x4E00;&#x65E6;&#x96C6;&#x5408;&#x961F;&#x5217;&#x521B;&#x5EFA;&#x5B8C;&#x6210;&#xFF0C;&#x4EE5;&#x540E;&#x53EF;&#x4EE5;&#x901A;&#x8FC7;&#x6570;&#x636E;&#x7C7B;&#x578B;&#x4E3A;QueueSetHandle_t&#x7684;&#x53E5;&#x67C4;&#x8BBF;&#x95EE;&#x3002;
            <p>
        </p></td>
    </tr>
    <tr>
        <td valign="top">
            <b>
                &#x5411;&#x961F;&#x5217;&#x96C6;&#x5408;&#x6DFB;&#x52A0;&#x6210;&#x5458;
            </b>
        </td>
        <td>
            &#x4F7F;&#x7528; <a href="xQueueAddToSet.html">xQueueAddToSet()</a> API &#x6DFB;&#x52A0;&#x6210;&#x5458;&#x5230;&#x961F;&#x5217;&#x96C6;&#x5408;&#x4E2D;
            <p>
        </p></td>
    </tr>
    <tr>
        <td valign="top">
            <b>
                &#x5728;&#x96C6;&#x5408;&#x961F;&#x5217;&#x4E0A;&#x6302;&#x8D77;
            </b>
        </td>
        <td>
            <a href="xQueueSelectFromSet.html">xQueueSelectFromSet()</a> API &#x51FD;&#x6570; &#x7528;&#x6765;&#x6D4B;&#x8BD5;&#x96C6;&#x5408;&#x4E2D;&#x7684;&#x6210;&#x5458;&#x662F;&#x5426;&#x53EF;&#x4EE5;&quot;&#x8BFB;&#x53D6;&quot;--&quot;&#x8BFB;&#x53D6;&quot;&#x5BF9;&#x4E8E;&#x961F;&#x5217;&#x6765;&#x8BF4;&#x5C31;&#x662F;&#x53EF;&#x4EE5;&#x63A5;&#x6536;&#xFF0C;&#x5BF9;&#x4E8E;&#x4FE1;&#x53F7;&#x91CF;&#x6765;&#x8BF4;&#x5C31;&#x662F;&#x53EF;&#x4EE5;&#x83B7;&#x53D6;&#x3002;.
            <p>
            &#x5C31;&#x50CF;&#x4F7F;&#x7528; <a href="../../a00118.html">xQueueReceive()</a>
            &#x548C; <a href="a00122.html">xSemaphoreTake()</a> API&#x51FD;&#x6570;&#x4E00;&#x6837;, xQueueSelectFromSet()
            &#x5141;&#x8BB8;&#x8C03;&#x7528;&#x7684;&#x4EFB;&#x52A1;&#x9009;&#x62E9;&#x6027;&#x7684;&#x6302;&#x8D77;&#x76F4;&#x5230;&#x961F;&#x5217;&#x6210;&#x5458;&#x53EF;&#x8BFB;&#x3002;
            </p><p>
            &#x8C03;&#x7528;xQueueSelectFromSet()&#x7B49;&#x5F85;&#x8BFB;&#x53D6;&#x8D85;&#x65F6;&#x65F6;&#x8FD4;&#x56DE;NULL. &#x5426;&#x5219;&#x8FD4;&#x56DE;&#x76F8;&#x5E94;&#x7684;&#x53EF;&#x8BFB;&#x53D6;&#x7684;&#x96C6;&#x5408;&#x6210;&#x5458;&#x53E5;&#x67C4;&#xFF0C;&#x6B64;&#x65F6;&#x8C03;&#x7528;xQueueReceive()&#x6216;&#x8005;xSemaphoreTake()&#x4E00;&#x5B9A;&#x53EF;&#x4EE5;&#x83B7;&#x53D6;&#x5230;&#x76F8;&#x5173;&#x7684;&#x961F;&#x5217;&#x6216;&#x4FE1;&#x53F7;&#x91CF;
            </p><p>
        </p></td>
    </tr>
</table>



<p><strong>&#x793A;&#x4F8B;&#x4EE3;&#x7801;</strong></p><p><em>&#x6240;&#x6709;&#x7684;API&#xFF0C;&#x5B98;&#x65B9;&#x90FD;&#x63D0;&#x4F9B;&#x4E86;&#x4E00;&#x4E2A;&#x8BE6;&#x7EC6;&#x7684;&#x8BF4;&#x660E;&#xFF0C;&#x56E0;&#x4E3A;&#x6570;&#x91CF;&#x4F17;&#x591A;&#xFF0C;&#x8FD9;&#x90E8;&#x5206;&#x5185;&#x5BB9;&#x4E0D;&#x6253;&#x7B97;&#x7FFB;&#x8BD1;&#xFF0C;&#x6709;&#x9700;&#x8981;&#x7684;&#x53EF;&#x4EE5;&#x8BBF;&#x95EE;<a href="http://www.freertos.org/a00106.html" target="_blank">&#x5B98;&#x7F51;</a>&#x83B7;&#x53D6;&#x8FD9;&#x90E8;&#x5206;&#x5185;&#x5BB9;</em></p><p>&#x5728;<a href="http://www.freertos.org/xQueueCreateSet.html" target="_blank">xQueueCreateSet()</a>API&#x6587;&#x6863;&#x4E2D;&#x5305;&#x542B;&#x4E00;&#x4E2A;&#x793A;&#x4F8B;&#x7684;&#x6E90;&#x4EE3;&#x7801;&#xFF0C;&#x540C;&#x65F6;&#x5728;&#x4E0B;&#x8F7D;&#x7684;&#x6E90;&#x4EE3;&#x7801;&#x6587;&#x4EF6;&#x7684;&#x8DEF;&#x5F84;<code>FreeRTOS/Demo/Common/Minimal/</code>&#x4E0B;&#x63D0;&#x4F9B;&#x4E00;&#x4E2A;&#x547D;&#x540D;&#x4E3A;<code>QueueSet.c</code>&#x7684;demo&#x6E90;&#x4EE3;&#x7801;&#x3002;</p><h2 id="&#x4F7F;&#x7528;&#x96C6;&#x5408;&#x961F;&#x5217;&#x7684;&#x66FF;&#x4EE3;&#x9879;">&#x4F7F;&#x7528;&#x96C6;&#x5408;&#x961F;&#x5217;&#x7684;&#x66FF;&#x4EE3;&#x9879;</h2><p>&#x9664;&#x975E;&#x786E;&#x5B9E;&#x6709;&#x7279;&#x5B9A;&#x7684;&#x96C6;&#x6210;&#x95EE;&#x9898;&#x800C;&#x5FC5;&#x987B;&#x963B;&#x585E;&#x5728;&#x591A;&#x4E2A;&#x961F;&#x5217;&#x4E0A;&#xFF0C;&#x4F7F;&#x7528;&#x5355;&#x4E00;&#x961F;&#x5217;&#x5B9E;&#x73B0;&#x53EF;&#x4EE5;&#x8282;&#x7701;&#x66F4;&#x8FC7;&#x7684;ROM&#x3001;RAM&#x548C;&#x8FD0;&#x884C;&#x65F6;&#x95F4;&#x3002;freeRTOS+UDP&#x7684;&#x5B9E;&#x73B0;&#x65B9;&#x5F0F;&#x63D0;&#x4F9B;&#x4E86;&#x8FD9;&#x6837;&#x7684;&#x4E00;&#x4E2A;&#x66FF;&#x4EE3;&#x961F;&#x5217;&#x96C6;&#x5408;&#x7684;&#x4F8B;&#x5B50;&#xFF1A;</p><h3 id="udpip-stack-&#x95EE;&#x9898;&#x5B9A;&#x4E49;">UDP/IP Stack: &#x95EE;&#x9898;&#x5B9A;&#x4E49;</h3><p>&#x7BA1;&#x7406;freeRTOS+UDP&#x5806;&#x6808;&#x7684;&#x4EFB;&#x52A1;&#x662F;&#x4E8B;&#x4EF6;&#x9A71;&#x52A8;&#x7684;&#xFF0C;&#x800C;&#x4E8B;&#x4EF6;&#x6E90;&#x6709;&#x591A;&#x4E2A;&#xFF0C;&#x6709;&#x4E9B;&#x6709;&#x76F8;&#x5E94;&#x7684;&#x6570;&#x636E;&#x6E90;&#x7ED1;&#x5B9A;&#xFF0C;&#x800C;&#x6709;&#x4E9B;&#x5219;&#x6CA1;&#x6709;&#x3002;&#x4E8B;&#x4EF6;&#x5305;&#x62EC;&#xFF1A;</p><ul><li>&#x7F51;&#x5361;&#x6536;&#x5230;&#x6570;&#x636E;&#x5E27;&#xFF0C;&#x6570;&#x636E;&#x5E27;&#x4E2D;&#x5305;&#x542B;&#x5927;&#x91CF;&#x7684;&#x6570;&#x636E;&#x53CA;&#x53D8;&#x91CF;&#x3002;
</li>
<li>&#x7F51;&#x5361;&#x5B8C;&#x6210;&#x6570;&#x636E;&#x7684;&#x4F20;&#x8F93;&#xFF0C;&#x91CA;&#x653E;&#x7F51;&#x7EDC;&#x548C;DMA&#x7F13;&#x51B2;&#x533A;&#x3002;
</li>
<li>&#x5E94;&#x7528;&#x53D1;&#x9001;&#x4E00;&#x4E2A;&#x5305;&#x542B;&#x5F88;&#x591A;&#x6570;&#x636E;&#x7684;&#x6570;&#x636E;&#x5305;&#x3002;
</li>
<li>&#x8F6F;&#x4EF6;&#x5B9A;&#x65F6;&#x5668;&#x7684;&#x5B9A;&#x65F6;&#x4E8B;&#x4EF6;&#xFF0C;&#x6B64;&#x4E8B;&#x4EF6;&#x6CA1;&#x6709;&#x76F8;&#x8054;&#x7CFB;&#x7684;&#x6570;&#x636E;&#x3002;
</li></ul>
<h3 id="udpip-stack-&#x89E3;&#x51B3;&#x65B9;&#x6CD5;">UDP/IP Stack: &#x89E3;&#x51B3;&#x65B9;&#x6CD5;</h3><p>UDP/IP &#x6808;&#x4F7F;&#x7528;&#x4E0D;&#x540C;&#x7684;&#x961F;&#x5217;&#x6765;&#x5B58;&#x50A8;&#x4E8B;&#x4EF6;&#x6E90;&#xFF0C;&#x7136;&#x540E;&#x4F7F;&#x7528;&#x540C;&#x4E00;&#x4E2A;&#x961F;&#x5217;&#x7528;&#x4EE5;&#x8BBE;&#x7F6E;&#x963B;&#x585E;&#xFF1A;</p><ul><li>&#x5B9A;&#x4E49;&#x4E00;&#x4E2A;&#x7ED3;&#x6784;&#x4F53;&#x7528;&#x6765;&#x5305;&#x542B;&#x4E8B;&#x4EF6;&#x7C7B;&#x578B;&#x548C;&#x4E0E;&#x6B64;&#x4E8B;&#x4EF6;&#x76F8;&#x5173;&#x7684;&#x6570;&#x636E;&#x6307;&#x9488;&#x3002;
</li>
<li>&#x4F7F;&#x7528;&#x540C;&#x4E00;&#x4E2A;&#x961F;&#x5217;&#x6765;&#x4FDD;&#x5B58;&#x4E0A;&#x9762;&#x5B9A;&#x4E49;&#x7684;&#x7ED3;&#x6784;&#x4F53;&#xFF0C;&#x6BCF;&#x4E2A;&#x4E8B;&#x4EF6;&#x90FD;&#x4F1A;&#x88AB;&#x53D1;&#x9001;&#x5230;&#x540C;&#x4E00;&#x4E2A;&#x961F;&#x5217;&#x3002;
</li></ul>
<p>&#x7ED3;&#x6784;&#x4F53;&#x5B9A;&#x4E49;&#x5982;&#x4E0B;&#xFF1A;</p><pre><code>typedef struct IP_TASK_COMMANDS
<span class="token punctuation">{</span>
    eIPEvent_t eEventType<span class="token punctuation">;</span> /* &#x4E8B;&#x4EF6;&#x7C7B;&#x578B;. */
    void *pvData<span class="token punctuation">;</span> /* &#x4E8B;&#x4EF6;&#x5173;&#x8054;&#x6570;&#x636E;&#x6307;&#x9488; */

<span class="token punctuation">}</span> xIPStackEvent_t<span class="token punctuation">;</span></code></pre>
<p>&#x8FD9;&#x6837;&#x5C31;&#x5F88;&#x65B9;&#x4FBF;&#x5B9E;&#x73B0;&#x4E00;&#x4E2A;&#x4E8B;&#x4EF6;&#x9A71;&#x52A8;&#x7684;&#x7A0B;&#x5E8F;&#x7ED3;&#x6784;&#xFF0C;&#x6839;&#x636E;&#x4E8B;&#x4EF6;&#x7C7B;&#x578B;&#x9009;&#x62E9;&#x5904;&#x7406;&#x65B9;&#x5F0F;&#x548C;&#x76F8;&#x5173;&#x6570;&#x636E;&#xFF1A;</p><pre><code>/* The variable used to receive from the queue. */
xIPStackEvent_t xReceivedEvent<span class="token punctuation">;</span>

for<span class="token punctuation">(</span> <span class="token punctuation">;</span><span class="token punctuation">;</span> <span class="token punctuation">)</span>
<span class="token punctuation">{</span>
    /* &#x7B49;&#x5F85;&#x961F;&#x5217;&#x4E2D;&#x6570;&#x636E;&#x6709;&#x6548;&#xFF0C;&#x5426;&#x5219;&#x4E00;&#x76F4;&#x6302;&#x8D77; */
    xQueueReceive<span class="token punctuation">(</span> xNetworkEventQueue, <span class="token operator">&amp;</span>xReceivedEvent, portMAX_DELAY <span class="token punctuation">)</span><span class="token punctuation">;</span>

    /* &#x6839;&#x636E;&#x4E8B;&#x4EF6;&#x7C7B;&#x578B;&#x4E0D;&#x540C;&#xFF0C;&#x9009;&#x62E9;&#x76F8;&#x5E94;&#x5904;&#x7406;&#x65B9;&#x5F0F;. */
    switch<span class="token punctuation">(</span> xReceivedEvent.eEventType <span class="token punctuation">)</span>
    <span class="token punctuation">{</span>
        <span class="token keyword">case</span> eNetworkDownEvent <span class="token keyword">:</span>
            prvProcessNetworkDownEvent<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">break</span><span class="token punctuation">;</span>

        <span class="token keyword">case</span> eEthernetRxEvent <span class="token keyword">:</span>
            prvProcessEthernetFrame<span class="token punctuation">(</span> xReceivedEvent.pvData <span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">break</span><span class="token punctuation">;</span>

        <span class="token keyword">case</span> eARPTimerEvent <span class="token keyword">:</span>
            prvAgeARPCache<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">break</span><span class="token punctuation">;</span>

        <span class="token keyword">case</span> eStackTxEvent <span class="token keyword">:</span>
            prvProcessGeneratedPacket<span class="token punctuation">(</span> xReceivedEvent.pvData <span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">break</span><span class="token punctuation">;</span>

        <span class="token keyword">case</span> eDHCPEvent:
            vDHCPProcess<span class="token punctuation">(</span><span class="token punctuation">)</span><span class="token punctuation">;</span>
            <span class="token keyword">break</span><span class="token punctuation">;</span>

        default <span class="token keyword">:</span>
            /* &#x8FD9;&#x91CC;&#x5E94;&#x8BE5;&#x4E0D;&#x4F1A;&#x88AB;&#x6267;&#x884C;&#x5230;&#xFF0C;&#x5426;&#x5219;&#x5BF9;&#x4E8B;&#x4EF6;&#x7C7B;&#x578B;&#x7684;&#x5206;&#x7C7B;&#x4E0D;&#x5B8C;&#x6574; */
            <span class="token keyword">break</span><span class="token punctuation">;</span>
    <span class="token punctuation">}</span>
<span class="token punctuation">}</span></code></pre>

                                
                                </section>
                            
                        </div>
                    </div>
                
            </div>

            
                
                <a href="运行时间统计.html" class="navigation navigation-prev " aria-label="Previous page: 运行时间统计">
                    <i class="fa fa-angle-left"></i>
                </a>
                
                
                <a href="中断延迟.html" class="navigation navigation-next " aria-label="Next page: 中断延迟">
                    <i class="fa fa-angle-right"></i>
                </a>
                
            
        
    </div>

    <script>
        var gitbook = gitbook || [];
        gitbook.push(function() {
            gitbook.page.hasChanged({"page":{"title":"队列集合","level":"1.4.6","depth":2,"next":{"title":"中断延迟","level":"1.4.7","depth":2,"path":"进阶/高级/中断延迟.md","ref":"进阶/高级/中断延迟.md","articles":[]},"previous":{"title":"运行时间统计","level":"1.4.5","depth":2,"path":"进阶/高级/运行时间统计.md","ref":"进阶/高级/运行时间统计.md","articles":[]},"dir":"ltr"},"config":{"plugins":["prismx","-highlight","-search","duoshuo","ga","theme-comscore"],"styles":{"website":"styles/website.css","ebook":"styles/ebook.css","pdf":"styles/pdf.css","mobi":"styles/mobi.css","epub":"styles/epub.css"},"pluginsConfig":{"ga":{"configuration":"auto","token":"UA-80700049-1"},"duoshuo":{"short_name":"tangguocheng","theme":"default"},"prismx":{"css":["prismjs/themes/prism-tomorrow.css"]},"lunr":{"maxIndexSize":1000000,"ignoreSpecialCharacters":false},"sharing":{"facebook":true,"twitter":true,"google":false,"weibo":false,"instapaper":false,"vk":false,"all":["facebook","google","twitter","weibo","instapaper"]},"fontsettings":{"theme":"white","family":"sans","size":2},"theme-comscore":{},"theme-default":{"styles":{"website":"styles/website.css","pdf":"styles/pdf.css","epub":"styles/epub.css","mobi":"styles/mobi.css","ebook":"styles/ebook.css","print":"styles/print.css"},"showLevel":false}},"mobi":{"fontSize":12,"footerTemplate":null,"headerTemplate":null,"margin":{"bottom":36,"left":62,"right":62,"top":36},"pageNumbers":false,"paperSize":"a4"},"theme":"default","author":"tangguocheng","pdf":{"pageBreaksBefore":"/","headerTemplate":null,"paperSize":"a4","margin":{"right":62,"left":62,"top":36,"bottom":36},"fontSize":12,"fontFamily":"Arial","footerTemplate":null,"chapterMark":"pagebreak","pageNumbers":false},"structure":{"langs":"LANGS.md","readme":"README.md","glossary":"GLOSSARY.md","summary":"SUMMARY.md"},"variables":{},"title":"freeRTOS中文文档","language":"Chinese","links":{"sidebar":{"博客":"http://www.xn--4gqa63c686ta68iba.ren/"}},"gitbook":"*","description":"freeRTOS中文文档","extension":null},"file":{"path":"进阶/高级/队列集合.md","mtime":"2016-09-08T08:45:52.755Z","type":"markdown"},"gitbook":{"version":"3.2.0","time":"2016-09-18T09:07:11.640Z"},"basePath":"../..","book":{"language":""}});
        });
    </script>
</div>

        
    <script src="../../gitbook/gitbook.js"></script>
    <script src="../../gitbook/theme.js"></script>
    
        
        <script src="../../gitbook/gitbook-plugin-duoshuo/duoshuo.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-ga/plugin.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/lunr.min.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-lunr/search-lunr.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-sharing/buttons.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-fontsettings/fontsettings.js"></script>
        
    
        
        <script src="../../gitbook/gitbook-plugin-theme-comscore/test.js"></script>
        
    

    </body>
</html>

